import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { store, key } from './store'
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'

const app = createApp(App)
app.use(ElementPlus);
app.use(store, key)
app.use(router)

import * as Icons from '@element-plus/icons-vue'
Object.keys(Icons).forEach((key: string) => {
    app.component(key, Icons[key as keyof typeof Icons])
});

import VueCesium from 'vue-cesium'
import 'vue-cesium/dist/index.css'
app.use(VueCesium)

import VueAxios from 'vue-axios';
import axios from '@/http';
app.use(VueAxios, axios);
app.provide('axios', app.config.globalProperties.axios)  // provide 'axios'
app.mount('#app');
